import java.util.Scanner;

public class Main {
    public static void login(String name,String passWord)throws passWordException,userNameException{
        passWord pw= new passWord();
        userName un= new userName();
        if(!pw.comparison(passWord)){
            throw new passWordException("密码输入异常......");
        }
        else if (!un.comparison(name))
            throw new userNameException("ID输入异常......");

    }

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String passWord=sc.nextLine();
        String userName=sc.nextLine();
        try{
            login(passWord,userName);
        }catch (passWordException e){
            e.printStackTrace();
        }catch (userNameException e){
            e.printStackTrace();
        }
    }
}